var blog = {
	saveBlog : function() {
		var obj = this;
		var title = $("#blog_title").val();
		var content = $("#blog_content").val();
		if (obj.checkBlog(title, content)) {
			$.ajax({
				url : 'http://www.txazo.com/json/saveBlog.jsps',
				type : 'post',
				data : {
					'title' : title,
					'content' : content
				},
				dataType : 'json',
				success : function(data) {
					alert(data.flag);
				}
			});
		}
	},
	checkBlog : function(title, content) {
		return true;
	}
};

$(document).ready(function() {
	$("#blog_submit").click(function() {
		blog.saveBlog();
	});
});